//
// Created by amon.huang on 2021/7/26.
//

#ifndef AMONPLAYER_PUSH_PACKETQUEUE_H
#define AMONPLAYER_PUSH_PACKETQUEUE_H

#include <queue>
#include <pthread.h>

#include "librtmp/include/rtmp.h"

class PushPacketQueue {
public:
    std::queue<RTMPPacket *> *pPushPacketQueue;
    pthread_mutex_t pushPacketMutex;
    pthread_cond_t pushPacketCond;

public:
    PushPacketQueue();

    ~PushPacketQueue();

    void push(RTMPPacket *pPacket);

    RTMPPacket *pop();

    void clear();

    void notify();
};


#endif //AMONPLAYER_PACKETQUEUE_H
